<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 选取.box下的子集p,第三级和后面阶段不被选取 */
        .box>p {
            color: red;
        }
    </style>
</head>

<body>
    <div class="box">
        块元素
        <p>带有边距的块元素</p>
        <div>
            div1
            <p>
                p1
            </p>
        </div>
    </div>
</body>

</html>